@ Practice04-Printing_a_Character_or_an_Integer

	mov r3, #0	@ Initially, r3 contains 0 (r3 contains the maximum)
	ldr r0, =0x9000	@ r0 = 0x9000
	ldr r1, [r0]	@ r1 contains K
Loop:
	cmp r1, #0	@ Compare K (r1) with 0
	beq Done	@ If K is equal to 0, Done (goto the location done)
	sub r1, r1, #1	@ Decrement r1
	add r0, r0, #4	@ Increment r0 by 4
	ldr r4, [r0]	@ r4 contains the integer
	cmp r3, r4	@ Compare r3 with the integer
	bge Loop	@ If r3 is greater than or equal to the integer, goto Loop
	mov r3, r4	@ Otherwise, put the integer in r3
	b Loop
Done:
	ldr r0, addr_screen
	mov r1, r3
	bl printInt
	b halt
addr_screen:
	.word 0xD0000